<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <form action="" method="" enctype="multipart/form-data">
    <input type="file" name="xxx" id="">
  </form>
  <script>
    // url编码  特点 各种 %
    var str = "胡飞飞";
    // url转码
    console.log(encodeURI(str));
    // 解码
    console.log(decodeURI('%E9%A3%9E'));
  </script>
</body>
</html>